package com.tang.pojo;
public class CartItems {
    public CartItems(){

    }
    public CartItems(int id, String name, int count, double price, double priceTotal) {
        this.id = id;
        this.name = name;
        this.count = count;
        this.price = price;
        this.priceTotal = priceTotal;
    }
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getCount() {
        return count;
    }
    public void setCount(int count) {
        this.count = count;
    }
    public double getPrice() {
        return price;
    }
    public void setPrice(double price) {
        this.price = price;
    }
    public void setPriceTotal(double priceTotal) {
        this.priceTotal = priceTotal;
    }
    public double getPriceTotal() {
        return  count*price;
    }
    private int id;
    private String name;
    private int count=1;
    private double price;
    private double priceTotal;
    @Override
    public String toString() {
        return "CartItems{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", count=" + count +
                ", price=" + price +
                ", priceTotal=" + getPriceTotal() +
                '}';
    }
}
